<?php
/**
 * Created by PhpStorm.
 * User: sosyuki
 * Date: 2018/6/5
 * Time: 12:06
 */

namespace Drupal\distribution;


use Drupal\wx_pay\EasyWechatApp;

class DistributionChargeController extends EasyWechatApp {

  function charge(string $body, $total_fee, $auth_code) {
    $payment = $this->getPayment();
    return $payment->pay([
      'body' => $body,
      'out_trade_no' => $this->makeOutTradeNo(),
      'total_fee' => $total_fee,
      'auth_code' => $auth_code,
    ]);
  }
}